Fix variable declaration in AsyncSocks5Connection __init__ method#501
Fix variable declaration in AsyncSocks5Connection __init__ method#501devl00p merged 2 commits intoencode:masterfrom
Conversation
|
It can be reproduce with the httpx client 👍
ctrl+c after 1 second and you get the same error
|
lovelydinosaur
left a comment
There was a problem hiding this comment.
Great stuff, thanks!
The same change also needs to be made in httpcore/_sync/socks_proxy.py.
You can run scripts/unasync to do that automatically.
Also if you could add a new entry in CHANGELOG.md under a "Master branch" heading, with a one liner describing the change from a user POV. I'm not quite sure how to best phrase that? "Fix for SOCKS5 when connections are terminated" or something like that?
I'm also sent you an invite to the maintainers team. If you do choose to accept, then once this PR has been approved you'll have the relevant permissions to merge it yourself, and we can work together on getting a new release out with this fix.
|
Did the fix for sync Socks5Connection too and added a line to the CHANGELOG.md. Not sure I had to put a version number here but I did. |
|
Fab, thanks! I'd prob suggest "Unreleased" or "master branch" or something, but that's all good for now. You're welcome to merge this whenever. |
Playing with the latest httpcore and httpx versions I noticed an unexpected exception when the connection failed using a SOCKS proxy.
It turns out this is some kind of typo :
_connect_failedis used everywhere inAsyncSocks5Connectionbut at the time of__init__this variable is named_connection_failed.This PR just use the
_connect_failedeverywhere.